From c4ea6f0c90c61234a69ce330b91f00854641af9f Mon Sep 17 00:00:00 2001 From: Steven Hand Date: Wed, 23 Aug 2006 17:25:11 +0100 Subject: [PATCH] Don't emulate faulting writes to stack. May fix a number of recent hvm bugs with the new shadow code. A more complete clean-up of the emulation code will follow. Signed-off-by: Steven Hand --- xen/arch/x86/x86_emulate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/x86/x86_emulate.c b/xen/arch/x86/x86_emulate.c index 53f4fe4118..4016aa77e3 100644 --- a/xen/arch/x86/x86_emulate.c +++ b/xen/arch/x86/x86_emulate.c @@ -846,6 +846,9 @@ x86_emulate_memop( emulate_1op("dec", dst, _regs.eflags); break; case 6: /* push */ + /* Don't emulate if fault was on stack */ + if ( _regs.error_code & 2 ) + goto cannot_emulate; /* 64-bit mode: PUSH always pushes a 64-bit operand. */ if ( mode == X86EMUL_MODE_PROT64 ) { -- 2.30.2